<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        let money = 0
        while (true) {
            let ret = +prompt(`
            请选择操作：
            1.存钱
            2.取钱
            3.查询余额
            4.退出
            `)
            if (ret === 4) {
                break
            }
            switch (ret) {
                case 1:
                    money += +prompt("请输入存款金额")
                    break
                case 2:
                    money -= +prompt("请输入取款金额")
                    break
                case 3:
                    alert(`您的余额为${money}元`)
                    break
            }
        }
    </script>
</body>

</html>